<!-- 首页 -->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>首页</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <!-- 样式 -->
    <link rel="stylesheet" href="../../css/style.css"/>
    <!-- 主题（主要颜色设置） -->
    <link rel="stylesheet" href="../../css/theme.css"/>
    <!-- 通用的css -->
    <link rel="stylesheet" href="../../css/common.css"/>
</head>
<style>
    html::after {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        bottom: 0;
        content: '';
        display: block;
        background-attachment: fixed;
        background-size: cover;
        background-position: center;
        z-index: -1;
    }

    #swiper {
        overflow: hidden;
    }

    #swiper .layui-carousel-ind li {
        width: 16px;
        height: 10px;
        border-width: 0;
        border-style: solid;
        border-color: rgba(0, 0, 0, .3);
        border-radius: 3px;
        background-color: #f7f7f7;
        box-shadow: 0 0 6px rgba(255, 0, 0, .8);
    }

    #swiper .layui-carousel-ind li.layui-this {
        width: 24px;
        height: 10px;
        border-width: 0;
        border-style: solid;
        border-color: rgba(0, 0, 0, .3);
        border-radius: 0;
        background-color: red;
        box-shadow: 0 0 6px rgba(255, 0, 0, .8);
    }

    input#buynumber::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input#buynumber[type="number"] {
        -moz-appearance: textfield;
    }

    .message-container {
        width: 100%
    }

    .detail-tab .layui-tab-card > .layui-tab-title .layui-this {
        background-color: rgba(255, 0, 0, 0.36);
        color: #fff;
        font-size: 14px;
    }

    .data-detail {
        padding-bottom: 20px;
    }
    .data-detail .layui-breadcrumb a.first {
        color: rgba(179, 109, 97, 1) !important;
    }

    .text-success {
        color: #67C23A;
    }
    .text-danger {
        color: #F56C6C;
    }
    .detail-info {
        margin-top: 20px;
    }
    .detail-item {
        display: flex;
        align-items: center;
        margin: 15px 0;
        padding: 15px;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 0 6px rgba(0,0,0,0.1);
    }
    .detail-item span:first-child {
        flex: 0 0 120px;
        color: #333;
        font-size: 16px;
    }
    .detail-item span:last-child {
        flex: 1;
        color: #666;
        font-size: 14px;
    }
</style>
<body>

<div id="app">
    <div class="data-detail">
        <div class="data-detail-breadcrumb" :style='{"padding":"0 10px","boxShadow":"0 0 6px rgba(0,0,0,0.1)","margin":"20px auto","borderColor":"#eee","backgroundColor":"#fff","borderRadius":"4px","borderWidth":"1px","borderStyle":"solid","height":"64px"}'>
            <span class="layui-breadcrumb">
                <a class="first" :style='{"padding":"8px 10px","color":"#333","fontSize":"16px"}' href="../home/home.html">首页</a>
                <a><cite :style='{"padding":"8px 15px","color":"#333","fontSize":"16px"}'>{{title}}</cite></a>
            </span>
        </div>
        <div class="detail-container" :style='{"padding":"20px","boxShadow":"0 0 6px rgba(0,0,0,0.1)","margin":"0 auto","borderColor":"#eee","backgroundColor":"#fff","borderRadius":"8px","borderWidth":"1px","borderStyle":"solid","maxWidth":"1200px"}'>
            <h1 style="position: relative;" :style='{"padding":"15px 0","borderColor":"#eee","backgroundColor":"#fff","color":"#333","borderRadius":"8px","textAlign":"center","borderWidth":"0 0 1px 0","fontSize":"22px","borderStyle":"solid","marginBottom":"20px"}' class="title">{{detail.yonghuxingming}} 的评审结果</h1>
            
            <div class="detail-info">
                <div class="detail-item">
                    <span>用户名：</span>
                    <span>{{detail.yonghuming}}</span>
                </div>
                <div class="detail-item">
                    <span>用户姓名：</span>
                    <span>{{detail.yonghuxingming}}</span>
                </div>
                <div class="detail-item">
                    <span>工作单位：</span>
                    <span>{{detail.gongzuodanwei}}</span>
                </div>
                <div class="detail-item">
                    <span>评审专业：</span>
                    <span>{{detail.pingshenzhuanye}}</span>
                </div>
                <div class="detail-item">
                    <span>职称级别：</span>
                    <span>{{detail.zhichengjibie}}</span>
                </div>
                <div class="detail-item">
                    <span>评审结果：</span>
                    <span :class="detail.pingshenjieguo === '通过' ? 'text-success' : 'text-danger'" style="font-weight: bold; font-size: 16px;">{{detail.pingshenjieguo}}</span>
                </div>
                <div class="detail-item">
                    <span>评审日期：</span>
                    <span>{{detail.pingshenriqi}}</span>
                </div>
                <div class="detail-item">
                    <span>工号：</span>
                    <span>{{detail.gonghao}}</span>
                </div>
                <div class="detail-item">
                    <span>评审员姓名：</span>
                    <span>{{detail.pingshenyuanxingming}}</span>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-row detail-tab">
        <div class="layui-tab layui-tab-card"
             :style='{"boxShadow":"0 0 2px#44cef6 ","borderColor":"rgba(68, 206, 246, 1)","backgroundColor":"#fff","borderRadius":"4px","borderStyle":"solid","borderWidth":"1px"}'
             style="overflow: hidden;">
            <ul class="layui-tab-title"
                :style='{"color":"rgba(76, 141, 174, 1)","backgroundColor":"rgba(224, 240, 233, 1)","fontSize":"16px"}'>
            </ul>
            <div class="layui-tab-content">
            </div>
        </div>
    </div>
</div>


<script src="../../layui/layui.js"></script>
<script src="../../js/vue.js"></script>
<!-- 组件配置信息 -->
<script src="../../js/config.js"></script>
<!-- 扩展插件配置信息 -->
<script src="../../modules/config.js"></script>
<!-- 工具方法 -->
<script src="../../js/utils.js"></script>

<script>
    var vue = new Vue({
        el: '#app',
        data: {
            // 轮播图
            swiperList: [],
            // 数据详情
            detail: {
                id: 0
            },
            // 当前详情页表
            detailTable: 'jieguogongbu',
            // 评价列表
            dataList: [],
            // 标题
            title: '结果公布详情'
        },
        methods: {
            jump(url) {
                jump(url)
            },
            isAuth(tablename, button) {
                return isFrontAuth(tablename, button)
            }
        }
    });

    layui.use(['layer', 'form', 'element', 'carousel', 'http', 'jquery'], function() {
        var layer = layui.layer;
        var element = layui.element;
        var form = layui.form;
        var carousel = layui.carousel;
        var http = layui.http;
        var jquery = layui.jquery;

        // 获取轮播图 数据
        http.request('config/list', 'get', {
            page: 1,
            limit: 5
        }, function(res) {
            if (res.data.list.length > 0) {
                let swiperList = [];
                res.data.list.forEach(element => {
                    if (element.name.indexOf('picture') >= 0 && element.value && element.value != "" && element.value != null) {
                        swiperList.push(element.value);
                    }
                });
                vue.swiperList = swiperList;
                
                vue.$nextTick(() => {
                    carousel.render({
                        elem: '#swiper',
                        width: '500px',
                        height: '500px',
                        arrow: 'hover',
                        anim: 'default',
                        autoplay: false,
                        interval: '3000',
                        indicator: 'inside'
                    });
                });
            }
        });

        // 获取详情信息
        http.request(`${vue.detailTable}/detail/` + http.getParam('id'), 'get', {}, function(res) {
            if(res.code == 0) {
                vue.detail = res.data;
            }
        });
    });
</script>
</body>
</html>
